import {
	request,
	requestData
} from "../Promise.js"
export default {
	// 课程列表
	getCourse(data) {
		return request({
			url: 'data-inspection-study/hg-app/study-lesson/info',
			method: 'post',
			data
		})
	},
	// 课程详情
	getDetails(id) {
		return request({
			url: `data-inspection-study/hg-app/study-lesson/info/${id}`,
			method: 'post',
		})
	},

	// 保存学习进度
	saveStudy(data) {
		return request({
			url: 'data-inspection-study/hg-app/study-record/save',
			method: 'post',
			data: data,
			header: {
				'content-type': "application/x-www-form-urlencoded",
			}
		})
	},


	// 学习记录(学员角色)
	getStudyRecord(data) {
		return request({
			url: 'data-inspection-study/hg-app/class-person/user-page',
			method: 'post',
			data
		})
	},

	// 我的测验列表
	getTestList(data) {
		return request({
			url: 'data-inspection-study/hg-app/exam-record/page',
			method: 'post',
			data
		})
	},

	// 开始挑战
	beganChallenge(data) {
		return request({
			url: 'data-inspection-study/hg-app/exam-record/start',
			method: 'post',
			data
		})
	},


	// 查看结果
	viewResults(data) {
		return request({
			url: 'data-inspection-study/hg-app/exam-record/info',
			method: 'post',
			data
		})
	},

	// 保存考试进度
	saveTest(data) {
		return request({
			url: 'data-inspection-study/hg-app/exam-recorditem/save',
			method: 'post',
			data
		})
	},

	// 交卷
	carryTest(data) {
		return request({
			url: 'data-inspection-study/hg-app/exam-recorditem/submit',
			method: 'post',
			data
		})
	},

	// 重新考试
	queryTest(data) {
		return request({
			url: 'data-inspection-study/hg-app/exam-record/again',
			method: 'post',
			data
		})
	},
}